<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0-rc1.js"></script>
</head>
<body>
<script type="text/javascript">
 $(document).ready(function(){
     $.ajax({
    url:"test.php",
    type: "post",
    dataType: "text",
    success: function(data){
     alert(data);//$a的值
    }
    })
})
</script>
</body>
</html>